Skip to content

ATL-1137: Show error when could not connect to CLI #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

kittaakos
Copy link
Contributor

Signed-off-by: Akos Kitta [email protected]

@kittaakos
Copy link
Contributor Author

@per1234, @rsora, what should we do with this PR? Thank you!

@per1234
Copy link
Contributor

per1234 commented Mar 29, 2021

I think it's a very important improvement. I have tried it out myself and also have interacted with a couple users who were able to use it to troubleshoot problems.

@kittaakos kittaakos marked this pull request as ready for review March 29, 2021 14:49
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have already encountered several situations where the information provided by this change is essential for troubleshooting.

Library installed with invalid metadata, now displays the helpful error message:

Request loadSketch failed with message: 2 UNKNOWN: cannot initialize package manager: libraries rescan: loading libs from c:\Users\per\Documents\Arduino\libraries: loading library from c:\Users\per\Documents\Arduino\libraries\BadLib: loading library.properties: Error reading file: Error parsing data at line 0: Invalid line format, should be 'key=value'

Platform installled under an invalid version folder name, now displays the helpful error message:

Request loadSketch failed with message: 2 UNKNOWN: cannot initialize package manager: error loading hardware packages: loading hardware from c:\Users\per\AppData\Local\Arduino15\packages: loading package arduino: invalid version dir C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.foo: no patch version found

No access to the Internet on first startup, now displays the helpful error message:

Request loadSketch failed with message: 2 UNKNOWN: downloading builtin:[email protected] tool: Get "https://downloads.arduino.cc/tools/ctags-5.8-arduino11-pm-i686-mingw32.zip": dial tcp: lookup downloads.arduino.cc: no such host

Use of a proxy server (the IDE currently requires the user to configure the proxy settings in the preferences), now displays the helpful error message:

Request loadSketch failed with message: 2 UNKNOWN: downloading builtin:[email protected] tool: Get "https://downloads.arduino.cc/tools/ctags-5.8-arduino11-pm-i686-mingw32.zip": dial tcp 104.18.28.45:443: connectex: No connection could be made because the target machine actively refused it.

Previously, all these diverse issues only resulted in the IDE hanging at the splash screen and a generic root ERROR Could not create client for gRPC. error message if you ran it from the command line.

@kittaakos
Copy link
Contributor Author

Thank you for the review. 👍

@kittaakos kittaakos merged commit 26a1db3 into main Mar 31, 2021
@kittaakos kittaakos deleted the atl-1137--grpc-client-error branch March 31, 2021 11:46
@per1234 per1234 added topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: enhancement Proposed improvement labels Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants